/*

Author   : chaos

FileName : call_con_pro2.cpp

Date     : 14/08/17 22:43:48

*/
#include <iostream>
using namespace std;

class A
{
    public:
        A()
        { cout << "A's constructor is called! " << endl; }
        A(int a)
        { cout << "A's 1-parameter constructor is called !" << endl; }
        ~A()
        {cout << "A's destructor is called!" << endl;}
};

class D
{
    public:
        D()
        { cout << "D's constructor is called !" << endl; }
        D(int d)
            {cout << "D's 1-parameter constructor is called !" << endl;}
        ~D()
        { cout << "D's destructor is called!" << endl; }
};

class E:public A, public D
{
    public:
       E():D(1),A(1)
       { cout << "E's constructor is called !" << endl; }
       ~E()
       {cout << "E's destructor is called !" << endl;}
};

int main(int argc ,char *argv[])
{
    cout << "To declare E_object ......" << endl;
    E * E_object = new E;

    cout << endl << "To delete E_object......" << endl;
    delete E_object;

    return 0;
}
